<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>常用指令：v-model</title>
		<script type="text/javascript" src="../js/framework/vue.js"></script>
		<script>
			window.onload = function () {
				let vm = new Vue({
					el: '#v_any',
					data: {  //存储数据
						flag: true
					},
					methods: {  //存储方法
						change () {
							this.flag=!this.flag
						}
					}
				});
			}
		</script>
	</head>
	<body>
		<div id="v_any">
			<!--隐藏/显示色块：方法一-->
			<!--<button v-on:click="change">隐藏/显示下方色块</button>-->
			
			<!--隐藏/显示色块：方法二-->
			<button v-on:click="flag=!flag">隐藏/显示下方色块</button>
			<div style="width: 100px; height: 100px; background-color: lightcyan;" v-show="flag">
				Hello Vue.js
			</div>
		</div>
	</body>
</html>
